This invention relates to network devices which receive and transmit data packets in a packet-based data communication network, particularly though not necessarily exclusively Ethernet networks. The invention is intended to be applicable to network switches and other devices commonly known as bridges and routers and other devices which have at least one, and normally more than one, receive port, at least one and normally more than one transmit port and storage space, typically but not necessarily dynamic random access memory, for the storage of data packets after they are received by the network device and before they are forwarded from it.
Network devices of the general nature to which the invention relates commonly include substantial memory space for the storage of data packets. Network devices may have a common memory space into which all packets passing through the device are stored or may be organised, alternatively or additionally, with respective memory space for each receive port and each transmit port. In this respect the terms xe2x80x98receive portxe2x80x99 and xe2x80x98transmit portxe2x80x99 are intended to include the receive and transmit functions of ports which are capable of bidirectional or duplex working.
In general, a compromise must be made between a small memory size, whether for the common memory space or memory space dedicated to any particular receive or transmit port, and over large memory size. The former produces a greater liability for congestion whereas the latter adds to the complexity and cost of the device. The latter is particularly relevant owing to a trend to include greater memory space within ASICS (application-specific-integrated circuits).
The main object of the present invention is to reduce dynamically the memory required for at least some packets and preferably packets generally. Reduction of the memory required for a given input packet size offers many advantages. For example, internal data buses within network devices can be made smaller for the same internal bandwidth performance. For an oversubscribed system, congestion will be held off longer (albeit not necessarily prevented) because more data can be stored before the memory capacity is filled
Most of the packet data which is processed by a switch or other network device is useless to the device itself Broadly, the data packets (which are defined in the relevant transmission standards) consist of a header in a particular format, message data and cyclic redundancy code data. Only the header information is used for switching or routing decisions. The remainder of the data is merely stored in the memory space within the device until it is either forwarded from a transmit port or discarded.
The present invention is based on compressing packets in respect of their data content after their headers, so as to reduce the storage space required and decompressing the compressed portions of the packets before they are forwarded from the network device. It is desirable for the device to include a means of distinguishing, for example by counting bytes, between the header portion and the subsequent portion of a packet and to select between compressed and uncompressed versions of the packet. It should be understood that xe2x80x98compressedxe2x80x99 herein refers to the application of a compression process or algorithm. It will be understood also that such a process or algorithm does not necessarily result, particularly in respect of small packets, in a reduction in size, though statistically it should do so. Consequently, it is preferred to include some further means which prevents, or at least lessens the probability, of an increase in the size of the packet as a result of the application of a compression algorithm. Such means may be used effectively to select an xe2x80x98uncompressedxe2x80x99 version of the packet in preference to a xe2x80x98compressed versionxe2x80x99.
Further objects and features will be apparent from the detailed description which follows.